From 2da9a5791fd19b7c19f85274e9ce1c5aeae37827 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Javier=20Jard=C3=B3n?= Date: Wed, 13 Apr 2011 20:46:31 +0100 Subject: [PATCH] Move documentation to inline comments: GtkFileChooserButton --- docs/reference/gtk/tmpl/.gitignore | 1 + .../gtk/tmpl/gtkfilechooserbutton.sgml | 162 ------------------ gtk/gtkfilechooserbutton.c | 41 +++++ 3 files changed, 42 insertions(+), 162 deletions(-) delete mode 100644 docs/reference/gtk/tmpl/gtkfilechooserbutton.sgml diff --git a/docs/reference/gtk/tmpl/.gitignore b/docs/reference/gtk/tmpl/.gitignore index 409c0e8bd5..7f5914723e 100644 --- a/docs/reference/gtk/tmpl/.gitignore +++ b/docs/reference/gtk/tmpl/.gitignore @@ -38,6 +38,7 @@ gtkeventbox.sgml gtkexpander.sgml gtkfeatures.sgml gtkfixed.sgml +gtkfilechooserbutton.sgml gtkfilechooserwidget.sgml gtkfilefilter.sgml gtkfontbutton.sgml diff --git a/docs/reference/gtk/tmpl/gtkfilechooserbutton.sgml b/docs/reference/gtk/tmpl/gtkfilechooserbutton.sgml deleted file mode 100644 index 844a1bbfdc..0000000000 --- a/docs/reference/gtk/tmpl/gtkfilechooserbutton.sgml +++ /dev/null @@ -1,162 +0,0 @@ - -GtkFileChooserButton - - -A button to launch a file selection dialog - - - -The #GtkFileChooserButton is a widget that lets the user select a -file. It implements the #GtkFileChooser interface. Visually, it is a -file name with a button to bring up a #GtkFileChooserDialog. -The user can then use that dialog to change the file associated with -that button. This widget does not support setting the "select-multiple" -property to %TRUE. - - - -Create a button to let the user select a file in /etc - -{ - GtkWidget *button; - - button = gtk_file_chooser_button_new (_("Select a file"), - GTK_FILE_CHOOSER_ACTION_OPEN); - gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (button), - "/etc"); -} - - - - -The #GtkFileChooserButton supports the #GtkFileChooserActions %GTK_FILE_CHOOSER_ACTION_OPEN and %GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER. - - - - -The #GtkFileChooserButton will ellipsize the label, -and thus will thus request little horizontal space. To give the button -more space, you should call gtk_widget_get_preferred_size(), -gtk_file_chooser_button_set_width_chars(), or pack the button in -such a way that other interface elements give space to the widget. - - - - - -#GtkFileChooserDialog - - - - - - - - - - -This should not be accessed directly. Use the accessor functions below. - - - - - - - - -@filechooserbutton: the object which received the signal. - - - - - - - - - - - - - - - - - - - - - - - - - - -@title: -@action: -@Returns: - - - - - - - -@dialog: -@Returns: - - - - - - - -@button: -@Returns: - - - - - - - -@button: -@title: - - - - - - - -@button: -@Returns: - - - - - - - -@button: -@n_chars: - - - - - - - -@button: -@Returns: - - - - - - - -@button: -@focus_on_click: - - diff --git a/gtk/gtkfilechooserbutton.c b/gtk/gtkfilechooserbutton.c index c12ef917f0..7b74874393 100644 --- a/gtk/gtkfilechooserbutton.c +++ b/gtk/gtkfilechooserbutton.c @@ -55,6 +55,47 @@ #include "gtktypebuiltins.h" #include "gtkprivate.h" + +/** + * SECTION:gtkfilechooserbutton + * @Short_description: A button to launch a file selection dialog + * @Title: GtkFileChooserButton + * @See_also:#GtkFileChooserDialog + * + * The #GtkFileChooserButton is a widget that lets the user select a + * file. It implements the #GtkFileChooser interface. Visually, it is a + * file name with a button to bring up a #GtkFileChooserDialog. + * The user can then use that dialog to change the file associated with + * that button. This widget does not support setting the + * #GtkFileChooser:select-multiple property to %TRUE. + * + * + * Create a button to let the user select a file in /etc + * + * { + * GtkWidget *button; + * + * button = gtk_file_chooser_button_new (_("Select a file"), + * GTK_FILE_CHOOSER_ACTION_OPEN); + * gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (button), + * "/etc"); + * } + * + * + * + * The #GtkFileChooserButton supports the #GtkFileChooserActions + * %GTK_FILE_CHOOSER_ACTION_OPEN and %GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER. + * + * + * The #GtkFileChooserButton will ellipsize the label, + * and thus will thus request little horizontal space. To give the button + * more space, you should call gtk_widget_get_preferred_size(), + * gtk_file_chooser_button_set_width_chars(), or pack the button in + * such a way that other interface elements give space to the widget. + * + */ + + /* **************** * * Private Macros * * **************** */ -- 2.30.2